<html>
<head>
<style type="text/css">
<!--
{
	margin: 0;
	padding: 0;
}
body {
	font-size: small;
	font-family: 'Gill Sans', 'Verdana', 'Helvetica', sans-serif;
	margin: 0px 1px;
}
#everything {
	margin: 0 auto;
}
a {
	color: #0f5887;
	text-decoration: none;
}
a:focus,
a:hover {
	color: #de8000;
}
a img {
	border: none;
}
em {
	font-style: normal;
}
ol,
ul {
	list-style-type: none;
	padding: 0px;
	margin: 0px;
}
#messages {
	position: relative;
	z-index: 10;
	width: auto;
	height: 100%;
	background: #fff;
}
#messages li {
	position: relative;
	margin: 0px;
}
#messages .timestamp {
	display: none;
}
#messages .systemMessage,
#messages .timemark {
	padding: 0.2em 1.25em 0.2em 34px;
	color: #555;
	text-align: right;
	line-height: 1;
}
#messages .timemark {
	display: block;
	color: #e1bb88;
}
#messages .systemMessage em {
	color: #805f40;
}
#messages .systemMessage.me em,
#messages .messageText.me {
	color: #7b7e54;
}
#messages .handle {
	margin: 0.5em 0 0.25em;
	padding-left: 34px;
	color: #793b00;
	font-size: 1.2em;
	line-height: 0.75;
}
#messages .handle.me {
	color: #768000;
}
#messages .handle img {
	position: absolute;
	top: 0;
	left: 4px;
	width: 26px;
	height: 26px;
}
#messages .messageText {
	margin: 0 0.73em 0 30px;
	padding: 0 0.25em 0.3em 4px;
	border-top: 0;
	line-height: 1;
	word-wrap: break-word;
}
#messages .systemMessage,
#messages .broadcastMessage,
#messages .timemark {
	font-size: 0.9em;
}
#messages .handle,
#messages .messageText {
	font-size: 1.1em;
}
-->
</style>
<!--[if lte IE 6]>
<style type="text/css">
html {
	overflow: hidden;
	position: relative;
}
#messages li {
	zoom: 1;
}
#messages .handle {
	line-height: 1;
}
#messages .handle img {
	top: 0;
}
#messages .systemMessage,
#messages .broadcastMessage,
#messages .timemark {
	font-size: 0.75em;
}
#messages .handle,
#messages .messageText {
	font-size: 0.95em;
}
</style>
<![endif]-->
<!--[if IE 7]>
<style text="text/css">
#messages {
	z-index: 2;
}
#messages .message {
	zoom: 1;
}
#messages .handle {
	line-height: 1.0;
}
#messages .messageText {
	line-height: 1.1;
}
#messages .systemMessage,
#messages .broadcastMessage,
#messages .timemark {
	font-size: 0.75em;
}
#messages .handle,
#messages .messageText {
	font-size: 0.95em;
}
</style>
<![endif]-->
<script type="text/javascript">
<!--
	if (/MSIE/.test(navigator.userAgent)) {
		IE = true;
		IE7 = /MSIE 7\.0/.test(navigator.userAgent);
	} else {
		IE = false;
		IE7 = false;
	}
	function addHandle(nickName, iconUrl, showIcon) {
		var messages = document.getElementById("messages");
		var html = "<li class='message handle'>";
		if (showIcon) {
			html += "<img alt='' src='" + iconUrl + "' />";
		}
		html += nickName;
		html += "</li>";
		messages.innerHTML = messages.innerHTML + html;
	}
	function addMessageText(message, messageId) {
		var messages = document.getElementById("messages");
		var html = "<li class='message messageText' id='" + messageId + "'>";
		if (message.match(/^(https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:@&=+\$,%#]+(?:(?:\.[Jj][Pp][Gg])|(?:\.[Jj][Pp][Ee][Gg])|(?:\.[Gg][Ii][Ff])|(?:\.[Pp][Nn][Gg]))[-_.!~*'()a-zA-Z0-9;\/?:@&=+\$,%#]*)/)) {
	       	message = message.replace(/^(https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:@&=+\$,%#]+(?:(?:\.[Jj][Pp][Gg])|(?:\.[Jj][Pp][Ee][Gg])|(?:\.[Gg][Ii][Ff])|(?:\.[Pp][Nn][Gg]))[-_.!~*'()a-zA-Z0-9;\/?:@&=+\$,%#]*)/,
	       								'<a href="$1"><img src="$1" alt="$1" /></a>');
		} else if (message.match(/^https?:\/\/(?:www.)?youtube.com\/watch\?v=([a-zA-Z0-9_-]+)[-_.!~*'()a-zA-Z0-9;\/?:@&=+\$,%#]*/)) {
			message = message.replace(/^https?:\/\/(?:www.)?youtube.com\/watch\?v=([a-zA-Z0-9_-]+)[-_.!~*'()a-zA-Z0-9;\/?:@&=+\$,%#]*/,
										'<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>');
       	} else {
			message = message.replace(/(https?:\/\/(?:[-_.!~*'()a-zA-Z0-9;\/?:@=+\$,%#]|(?:(?!(?:&lt;)|(?:&gt;)|(?:&quot;))&?))+[A-Za-z0-9\/])/g, '<a href="$1">$1</a>')
	                         .replace(/^(www\.[-_.!~*'()a-zA-Z0-9;\/?:@&=+\$,%#]+[A-Za-z0-9\/])/g, '<a href="http://$1">$1</a>')
	                         .replace(/(\n)/g, '<br />')
	                         .replace(/(^|\s+)(:-?\()/g, '$1<img src="http://www.lingr.com/images/emoticons/sad.gif" alt="$2" class="emoticon" />')
	                         .replace(/(^|\s+)(:-?D)/g, '$1<img src="http://www.lingr.com/images/emoticons/bigsmile.gif" alt="$2" class="emoticon" />')
	                         .replace(/(^|\s+)(:-?(?:o|O))/g, '$1<img src="http://www.lingr.com/images/emoticons/wow.gif" alt="$2" class="emoticon" />')
	                         .replace(/(^|\s+)(:-?\*)/g, '$1<img src="http://www.lingr.com/images/emoticons/kiss.gif" alt="$2" class="emoticon" />')
	                         .replace(/(^|\s+)(:-?\))/g, '$1<img src="http://www.lingr.com/images/emoticons/smile.gif" alt="$2" class="emoticon" />')
	                         .replace(/(^|\s+)(:'\()/g, '$1<img src="http://www.lingr.com/images/emoticons/cry.gif" alt="$2" class="emoticon" />')
	                         .replace(/(^|\s+)(:-?\|)/g, '$1<img src="http://www.lingr.com/images/emoticons/plain.gif" alt="$2" class="emoticon" />')
	                         .replace(/(^|\s+)(;-?\))/g, '$1<img src="http://www.lingr.com/images/emoticons/wink.gif" alt="$2" class="emoticon" />')
	                         .replace(/(^|\s+)(:-?\(\|\))/g, '$1<img src="http://www.lingr.com/images/emoticons/monkey.gif" alt="$2" class="emoticon" />');
		}
		html += message;
		html += "</li>";
		messages.innerHTML = messages.innerHTML + html;
		showElement(messageId);
	}
	function addSystemMessage(nickName, message, messageId) {
		var messages = document.getElementById("messages");
		var html = "<li class='message systemMessage' id='" + messageId + "'>";
		html += "<em>" + nickName + "</em> " + message;
		html += "</li>";
		messages.innerHTML = messages.innerHTML + html;
		showElement(messageId);
	}
	function addChangeNickNameSystemMessage(nickName, newNickName, message, messageId) {
		var messages = document.getElementById("messages");
		var html = "<li class='message systemMessage' id='" + messageId + "'>";
		html += "<em>" + nickName + "</em> " + message + " <em>" + newNickName + "</em>";
		html += "</li>";
		messages.innerHTML = messages.innerHTML + html;
		showElement(messageId);
	}
	function showElement(elementId) {
		var elem = document.getElementById(elementId);
		
		var messages = document.getElementById("messages");
		if (IE && !IE7) {
			elem.scrollIntoView(true);
		} else {
			var x = elem.x ? elem.x : elem.offsetLeft;
			var y = elem.y ? elem.y : elem.offsetTop;
			window.scrollTo(x, y);
		}
	}
//-->
</script>
</head>
<body oncontextmenu="return false;">
<div id="everything">
<ul id="messages">
</ul>
</div>
</body>
</html>